# -*- coding:utf-8 -*- 

from .channel import Channel

class Handler(object):
	def __init__(self,
			transport_factory,
			service,
			):
		assert callable(transport_factory)
		self._transport_factory = transport_factory
		self._service = service

	def __call__(self, sock, addr):
		print self
		transport = self._transport_factory(sock)
		channel = Channel(transport, self._service)

